home *** CD-ROM | disk | FTP | other *** search
/ Precision Software Appli…tions Silver Collection 1 / Precision Software Applications Silver Collection Volume One (PSM) (1993).iso / demos / hotkeyed.exe / HOTKEYED.H < prev    next >
Text File  |  1992-04-13  |  2KB  |  77 lines

  1. // Copyright (c) 1992 Microsoft Corporation. All rights reserved.
  2.  
  3. //**************************** Menu IDs
  4.  
  5. #define IDM_ABOUT               100
  6. #define IDM_EDITINSTALLHOTKEY   110
  7. #define IDM_REMOVEHOTKEY        120
  8.  
  9.  
  10. //**************************** Dialog Control IDs
  11.  
  12. #define IDD_HOTKEYEDIT      500
  13. #define IDD_INSTALL         510
  14.  
  15.  
  16. //**************************** Misc. Defines
  17.  
  18. #define MENU_BIT            0x0100
  19. #define CONTROL_BIT         0x0010
  20. #define SHIFT_BIT           0x0001
  21.  
  22. #define STR_LEN             30
  23. #define CAPTION_LEN         80
  24.  
  25. #define HOTKEY_TIMER        99          // Timer info
  26. #define TIME_OUT            1000
  27.  
  28. #define WM_HOTKEY           WM_USER+10
  29.  
  30.  
  31. //**************************** Type Defines
  32.  
  33. typedef struct tagHOTKEYSTRUCT
  34. {
  35.     WORD        wModifierKeys;
  36.     unsigned    uKey;
  37.     char        szText [STR_LEN];
  38. } HOTKEYSTRUCT;
  39.  
  40.  
  41. //**************************** Function Prototypes
  42.  
  43. int PASCAL WinMain (HANDLE hInstance, HANDLE hPrevInstance,
  44.                     LPSTR lpCmdLine,  int nCmdShow);
  45.  
  46. long FAR PASCAL MainWndProc (HWND hWnd,   unsigned uMessage,
  47.                              WORD wParam, LONG lParam);
  48.  
  49. BOOL FAR PASCAL AboutDlgProc (HWND hDlg,   unsigned uMessage,
  50.                               WORD wParam, LONG lParam);
  51.  
  52. BOOL FAR PASCAL HotKeyEditDlgProc (HWND hDlg,   unsigned uMessage,
  53.                                    WORD wParam, LONG lParam);
  54.  
  55. long FAR PASCAL HotKeyEditProc (HWND hHotKeyEdit, unsigned uMessage,
  56.                                 WORD wParam,      LONG lParam);
  57.  
  58. void DisplayHotKey (HWND hDlg,    WORD wModifierKeys,
  59.                     WORD wKeyNum, LONG lKeyInfo);
  60.  
  61. DWORD FAR PASCAL HotKeyHookCallback (int     nCode,
  62.                                      WORD    wParam,
  63.                                      DWORD   lParam);
  64.  
  65. long HandleKeyDowns (HWND hHotKeyEdit, unsigned uMessage,  WORD  wParam,
  66.                     LONG  lParam,      PWORD pwModifierKeys);
  67.  
  68. long HandleKeyUps (HWND hHotKeyEdit, unsigned uMessage,  WORD  wParam,
  69.                    LONG  lParam,     WORD wModifierKeys);
  70.  
  71.  
  72. void InstallHotKey (void);
  73.  
  74. void RemoveHotKey (void);
  75.  
  76. void DoErasingStuff (HWND hHotKeyEdit);
  77.